Skip to content

Conversation

@mxgrey
Copy link
Contributor

@mxgrey mxgrey commented Nov 28, 2025

This PR is in response to ros2-rust/ros2_rust#554 where a user reported an issue with overriding QoS settings based on node parameter values.

I've updated the parameter_demo to demonstrate that use case. I found no issue with changing the subscription reliability based on parameter values.

Signed-off-by: Michael X. Grey <greyxmike@gmail.com>
Signed-off-by: Michael X. Grey <greyxmike@gmail.com>
Copy link

@luca-della-vedova luca-della-vedova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While the example itself is useful I was investigating other libraries and I noticed that nodes by default offer a parameter interface to override the QoS.
For example, in my jazzy machine:

$ ros2 run examples_rclcpp_minimal_publisher publisher_lambda
# Another terminal
$ ros2 param list
/minimal_publisher:
  qos_overrides./parameter_events.publisher.depth
  qos_overrides./parameter_events.publisher.durability
  qos_overrides./parameter_events.publisher.history
  qos_overrides./parameter_events.publisher.reliability
  start_type_description_service
  use_sim_time

So I feel the best way forward would actually be to move this logic in rclrs, what do you think?

let _subscription =
node.create_subscription("greet", move |msg: example_interfaces::msg::String| {
let reliability_override = node
.declare_parameter::<Arc<str>>("qos_override/reliability")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note for self / others, parameters use . as a separator, not /

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants